package com.wf.it.common.api;

import com.wf.it.common.api.hystrix.UserServiceHystrixImpl;
import com.wf.it.common.entity.User;
import com.wf.it.common.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "hp-user",fallback = UserServiceHystrixImpl.class)
public interface UserService {
    @PostMapping("/user/login")
    public Result<User> userLogin(@RequestParam("loginName")String loginName,@RequestParam("loginPwd")String loginPwd);
    @GetMapping("/user/findbyloginname")
    public Result<User> findByLoginName(@RequestParam("loginName") String loginName);
    @PostMapping("/user/reg")
    public Result<User> reg(@RequestBody User user);
    @PostMapping("/user/changebalance")
    Result changeBalance(@RequestParam("userIdCard")String userIdCard, @RequestParam("money")int money);
}
